﻿<Window
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors" xmlns:Custom="http://schemas.devexpress.com/winfx/2008/xaml/charts/rangecontrolclient" xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid" xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core" xmlns:StockCrawlerLib="clr-namespace:StockCrawlerLib;assembly=StockCrawlerLib" x:Class="StockCrawlerWPF.ImportData"
        Title="ImportData" Height="583.356" Width="1283.761" WindowState="Maximized" WindowStartupLocation="CenterScreen">
    <Window.Resources>
        <dx:LinqServerModeDataSource x:Key="LinqServerModeDataSource" ContextType="{x:Type StockCrawlerLib:StockDataClassesDataContext}" DefaultSorting="ngay_giao_dich DESC" KeyExpression="id_stock" Path="histories">
            <dx:DesignDataManager.DesignData>
                <dx:DesignDataSettings RowCount="5"/>
            </dx:DesignDataManager.DesignData>
        </dx:LinqServerModeDataSource>
    </Window.Resources>
    <Grid>
        <Label x:Name="lblCode" Content="123" HorizontalAlignment="Left" Margin="30,21,0,0" VerticalAlignment="Top" Width="182"/>
        <Button x:Name="btnTestPrice" Content="Test thống kê giá" HorizontalAlignment="Left" Margin="10,472,0,0" VerticalAlignment="Top" Width="182" />
        <Button x:Name="btnTestOrder" Content="Test Thống kê đặt lệnh" HorizontalAlignment="Left" Margin="10,511,0,0" VerticalAlignment="Top" Width="182" />
        <Button x:Name="btnImportHistory" Content="Import History" HorizontalAlignment="Left" Margin="30,54,0,0" VerticalAlignment="Top" Width="182" Click="btnImportHistory_Click"/>

        <!--<dxg:GridControl AutoGenerateColumns="AddNew" Margin="403,88,33,199">
            <dxg:GridControl.View>
                <dxg:TableView AllowEditing="False" ShowAutoFilterRow="True"  />
            </dxg:GridControl.View>
        </dxg:GridControl>-->
        <Button x:Name="btnTestImportHistory" Content="Test Import History" HorizontalAlignment="Left" Margin="10,435,0,0" VerticalAlignment="Top" Width="182" />
        <Label x:Name="lblError" Content="Error                " HorizontalAlignment="Left" Margin="30,161,0,0" VerticalAlignment="Top" Width="92" RenderTransformOrigin="0.5,0.5"/>
        <dxe:CheckEdit x:Name="chkOnlyToday" HorizontalAlignment="Left" Margin="30,194,0,0" VerticalAlignment="Top" Width="150" Content="Only Today"/>
        <dxe:DateEdit x:Name="dtStart" HorizontalAlignment="Left" Margin="76,92,0,0" VerticalAlignment="Top" Width="136"/>
        <Label x:Name="lblStart" Content="Start" HorizontalAlignment="Left" Margin="30,92,0,0" VerticalAlignment="Top" Width="46"/>
        <Button x:Name="btnRefreshGrid" Content="Refresh" HorizontalAlignment="Left" Margin="232,54,0,0" VerticalAlignment="Top" Width="75" Click="btnRefreshGrid_Click"/>
        <Button x:Name="btnView" Content="View" HorizontalAlignment="Left" Margin="232,92,0,0" VerticalAlignment="Top" Width="75" Click="btnView_Click"/>
        <Button x:Name="btnCapNhatGiaTC" Content="Cập nhật giá tham chiếu" HorizontalAlignment="Left" Margin="10,396,0,0" VerticalAlignment="Top" Width="182" Click="btnCapNhatGiaTC_Click"/>
        <Label x:Name="lblCount" Content="1000 items" HorizontalAlignment="Left" Margin="225,128,0,0" VerticalAlignment="Top" Width="92" RenderTransformOrigin="0.63,-0.5"/>
        <Button x:Name="btnImportHistoryByCode" Content="Import" HorizontalAlignment="Left" Margin="152,233,0,0" VerticalAlignment="Top" Width="113" Click="btnImportHistoryByCode_Click"/>
        <Label x:Name="lblError_Copy" Content="Stock             " HorizontalAlignment="Left" Margin="19,236,0,0" VerticalAlignment="Top" Width="57" RenderTransformOrigin="0.5,0.5"/>
        <TextBox x:Name="txtCode" HorizontalAlignment="Left" Height="23" Margin="60,233,0,0" TextWrapping="Wrap" Text="TextBox" VerticalAlignment="Top" Width="75"/>
        <dx:DXTabControl Margin="322,3,0,18">
            <dx:DXTabItem Header="Tab">
                <Grid Background="Transparent">
                    <dxg:GridControl x:Name="gridHistory" AutoGenerateColumns="AddNew" EnableSmartColumnsGeneration="True">
                        <dxg:GridControl.View>
                            <dxg:TableView AllowPerPixelScrolling="True" ShowTotalSummary="True"/>
                        </dxg:GridControl.View>
                    </dxg:GridControl>
                </Grid>
            </dx:DXTabItem>
            <dx:DXTabItem Header="Tab" HorizontalAlignment="Right" Width="37">
                <Grid Background="Transparent">
                    <dxg:GridControl x:Name="gridViewLog" AutoGenerateColumns="AddNew" EnableSmartColumnsGeneration="True">
                        <dxg:GridControl.View>
                            <dxg:TableView AllowPerPixelScrolling="True" ShowTotalSummary="True"/>
                        </dxg:GridControl.View>
                    </dxg:GridControl>
                </Grid>
            </dx:DXTabItem>
        </dx:DXTabControl>
        <dxe:DateEdit x:Name="dtEnd" HorizontalAlignment="Left" Margin="76,128,0,0" VerticalAlignment="Top" Width="136"/>
        <Label x:Name="lblEnd" Content="End" HorizontalAlignment="Left" Margin="30,128,0,0" VerticalAlignment="Top" Width="46"/>
        <Button x:Name="btnUpdateStockList" Content="Update Stock List" HorizontalAlignment="Left" Margin="19,314,0,0" VerticalAlignment="Top" Width="130" Click="btnUpdateStockList_Click"/>
        <Label x:Name="lblStatus" Content="Message" HorizontalAlignment="Left" Margin="173,320,0,0" VerticalAlignment="Top" Width="92" RenderTransformOrigin="0.5,0.5"/>
        <Button x:Name="btnUpdateStockInfo" Content="Update Stock Info" HorizontalAlignment="Left" Margin="19,352,0,0" VerticalAlignment="Top" Width="130" Click="btnUpdateStockInfo_Click"/>

    </Grid>
</Window>
